package com.gcpproxy.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ContentItem {
    
    private String type;
    
    private String text;
    
    @JsonProperty("image_url")
    private ImageUrl imageUrl;
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ImageUrl {
        private String url;
    }
    
    public boolean isText() {
        return "text".equals(type);
    }
    
    public boolean isImage() {
        return "image_url".equals(type);
    }
}

